1. Field of the Invention
The present invention relates to a fixed length memory block management apparatus and a control method thereof, particularly to a fixed length memory block management apparatus provided with a multiprocessor and a method for controlling the fixed length memory block management apparatus.
2. Related Art
Recently, there is known a multiprocessor system in which a multiprocessor architecture including plural processors and a memory is adopted.
In the multiprocessor architecture, it is necessary that about one byte of small memory block be dynamically allocated as an exclusive control memory area in which a test and set command is used.
In the conventional multiprocessor system, the allocated memory block is set to a fixed length, a set of “an exclusive control memory area” and “a pointer to a head of an unused area” and a set of “a pointer to a next unused area” and “a current status of a memory area allocated to an application” are set as the memory block management area, and the fixed length memory block allocated to the application is managed by a link list connected to the pointer of the unused area.
However, in such multiprocessor systems, because a memory block management area is set every memory block allocated to the application, a memory address which cannot be stored in about one byte of small memory block is set in the memory block, unfortunately memory space efficiency is lowered.
On the other hand, Japanese Patent Publication Laid-Open No. 8-221317 discloses a fixed length memory block management method in which management is performed using a bitmap.
However, in the fixed length memory block management method disclosed in Japanese Patent Publication Laid-Open No. 8-221317, because an empty area is searched using the bitmap, it takes a long time to perform memory block allocation processing, unfortunately multiprocessor system processing efficiency is lowered.
On the other hand, in the conventional multiprocessor system, each processor acquires an exclusive access right (hereinafter referred to as “lock”) of a memory block management area in order to prevent the plural processors simultaneously access the memory block.
However, in such multiprocessor systems, the lock is acquired with respect to the whole of the memory block management area. Therefore, in the case where the lock is acquired by one of the processors, the other processor stands firm until the lock is released, which results in a problem in that multiprocessor system processing efficiency is lowered.
Additionally, in such multiprocessor systems, a starting address of the memory block management area is not decided when the memory block management area is dynamically ensured, and it is necessary to set the memory block management area again when the memory block is released. Therefore, the number of setting items is increased on the application side, which results in a problem in that a load on the application is increased.